<?php
/**
 * Header Block
 *
 * @author Xavier VILAIN
 * @package Shama\Contact
 * @license
 */
use Shama\Contact\Status;
use Shama\Contact\Type;
use Shama\Messages;
use Fox\Html\Input;
use Fox\Html\DropList;
use Fox\Generator;
$block = new Fox\Html\Block("bHeader",Msg(Messages::BUNDLE,Messages::LABEL_CONTACT_HEADER));

$users = Xview::instance()->application()->users();

$block->add(new DropList("owner"))
			->displayMode(DropList::DISPLAY_READONLY)
			->options($users,
						Generator::useAttribute("idusr"),
						Generator::concatenate(Generator::useAttribute("fname"),
												Generator::useAttribute("lname"),
												" "
								)
					);
$finder = new Status();
$status = $finder->find();
$block->add(new DropList("status",false,false,true,Status::STATUS_NEW))
				->options($status,Generator::useAttribute("status"),Generator::useAttribute("label"));
$block->add(new Input("customer_code"))->displayMode(Input::DISPLAY_READONLY);
return $block;